package com.education.wisdom.service.impl;

import com.education.common.utils.Convert;
import com.education.wisdom.mapper.SigninMapper;
import com.education.wisdom.pojo.Signin;
import com.education.wisdom.service.ISigninService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 签到 服务层实现
 * 
 * @author ruoyi
 * @date 2018-12-12
 */
@Service
public class SigninServiceImpl implements ISigninService
{
	@Autowired
	private SigninMapper signinMapper;

	/**
     * 查询签到信息
     * 
     * @param id 签到ID
     * @return 签到信息
     */
    @Override
	public Signin selectSigninById(Integer id)
	{
	    return signinMapper.selectSigninById(id);
	}


	/**
	 * 查询是否签到
	 * @param map
	 * @return
	 */
	@Override
	public Signin selectSigninFlag(Map<String, Object> map) {
		return signinMapper.selectSigninFlag(map);
	}

	/**
     * 查询签到列表
     * 
     * @param signin 签到信息
     * @return 签到集合
     */
	@Override
	public List<Signin> selectSigninList(Signin signin)
	{
	    return signinMapper.selectSigninList(signin);
	}
	
    /**
     * 新增签到
     * 
     * @param signin 签到信息
     * @return 结果
     */
	@Override
	public int insertSignin(Signin signin)
	{
	    return signinMapper.insertSignin(signin);
	}
	
	/**
     * 修改签到
     * 
     * @param signin 签到信息
     * @return 结果
     */
	@Override
	public int updateSignin(Signin signin)
	{
	    return signinMapper.updateSignin(signin);
	}

	/**
     * 删除签到对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteSigninByIds(String ids)
	{
		return signinMapper.deleteSigninByIds(Convert.toStrArray(ids));
	}

	@Override
	public List<Signin> selectSigninListById(Map<String, Object> map) {
		return signinMapper.selectSigninListById(map);
	}
	
}
